package scc.project.dao;

import org.apache.ibatis.annotations.Param;
import scc.project.entity.Supplier;

import java.util.List;

public interface SupplierDao {

    //查询
    /*List<Supplier> find();*/

    //添加
    int insert(Supplier supplier);


    List<Supplier> find(@Param("offset") int offset,
                        @Param("rows") int rows,
                        @Param("address") String address,
                        @Param("supplierName") String supplierName
    );

    Long findTotal(@Param("address") String address,
                   @Param("supplierName") String supplierName);


    //删除
    int deleteById(Long id);


    //根据id查询
    Supplier selectById(Long id);


    //修改
    int updateById(Supplier supplier);

    List<Supplier> selectAll();
}
